package com.muyu.payment.domain.req;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 支付订单保存请求对象
 *
 * @author muyu
 * @date 2025-09-16
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "支付订单保存请求对象")
public class PaymentOrderSaveReq{


    /**
     * 主键
     */
    @Schema(name = "id", title = "主键", description = "主键" )
    private Long id;

    /**
     * 订单号
     */
    @Schema(name = "orderNo", title = "订单号", description = "订单号" , required = true)
    private String orderNo;

    /**
     * 用户ID
     */
    @Schema(name = "userId", title = "用户ID", description = "用户ID" , required = true)
    private Long userId;

    /**
     * 订单金额
     */
    @Schema(name = "amount", title = "订单金额", description = "订单金额" , required = true)
    private BigDecimal amount;

    /**
     * 订单状态(1:待支付,2:已支付,8:已关闭,9:已退款)
     */
    @Schema(name = "status", title = "订单状态(1:待支付,2:已支付,8:已关闭,9:已退款)", description = "订单状态(1:待支付,2:已支付,8:已关闭,9:已退款)" , required = true)
    private Long orderStatus;

    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(name = "payTime", title = "支付时间", description = "支付时间" )
    private Date payTime;

    /**
     * 支付渠道
     */
    @Schema(name = "payChannel", title = "支付渠道", description = "支付渠道" )
    private String payChannel;

    /**
     * 第三方交易号
     */
    @Schema(name = "payTradeNo", title = "第三方交易号", description = "第三方交易号" )
    private String payTradeNo;

    /**
     * 订单标题
     */
    @Schema(name = "subject", title = "订单标题", description = "订单标题" , required = true)
    private String subject;

    /**
     * 订单描述
     */
    @Schema(name = "body", title = "订单描述", description = "订单描述" )
    private String body;

    /**
     * 客户端IP (IPv4/IPv6)
     */
    @Schema(name = "clientIp", title = "客户端IP (IPv4/IPv6)", description = "客户端IP (IPv4/IPv6)" )
    private String clientIp;

    /**
     * 异步通知地址
     */
    @Schema(name = "notifyUrl", title = "异步通知地址", description = "异步通知地址" )
    private String notifyUrl;

    /**
     * 同步返回地址
     */
    @Schema(name = "returnUrl", title = "同步返回地址", description = "同步返回地址" )
    private String returnUrl;

    /**
     * 订单过期时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(name = "expireTime", title = "订单过期时间", description = "订单过期时间" )
    private Date expireTime;

    /**
     * 备注
     */
    @Schema(name = "remark", title = "备注", description = "备注" )
    private String remark;

    /**
     * 支付类型
     */
    @Schema(name = "payType", title = "支付类型", description = "支付类型" )
    private Long payType;
    /**
     * 创建者
     */
    @Schema(name = "createBy", title = "创建者", description = "创建者" )
    private String createBy;
    /**
     * 修改者
     */
    @Schema(name = "updateBy", title = "修改者", description = "修改者" )
    private String updateBy;


    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(name = "createTime", title = "创建过期时间", description = "创建过期时间" )
    private Date createTime;
    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(name = "updateTime", title = "修改过期时间", description = "修改过期时间" )
    private Date updateTime;
}
